package cn.llssit.project.wechatapi.controller;

import cn.llssit.project.wechatapi.domain.MovieRelease;
import cn.llssit.project.wechatapi.mapper.MovieReleaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: Lesan
 * @Date: 2020-06-07
 */
@Controller
@RequestMapping("/wechatapi")
public class MovieReleaseController {
    @Autowired
    private MovieReleaseMapper movieReleaseMapper;

    @GetMapping("/countNum")
    @ResponseBody
    public Integer countNum(Integer id, String date){
        return movieReleaseMapper.CountNum(id,date);
    }

    @GetMapping("/getmovieManager")
    @ResponseBody
    public List<MovieRelease> getmovieManager(Integer id, String date){
        return movieReleaseMapper.selectByDate(id, date);
    }

}
